#include "main.h"

#include "uart0_interrupt.h"

struct UARTOpStruct
{
    uint8_t *TxBuf; //发送数据指针
    uint8_t TxLen;  //待发送数据长度
    uint8_t TxOpc;  //已发送数据长度
    uint8_t *RxBuf; //接收数据指针
    uint8_t RxLen;  //待接收数据长度
    uint8_t RxOpc;  //已接收数据长度
};
struct UARTOpStruct UARTxOp;

    uint8_t tmp08;


uint8_t TestTxData[11] = "TestUart-TX";
void Test_Uart0(void)
{
    //中断发送数组
    UARTxOp.TxBuf = TestTxData;
    UARTxOp.TxLen = 11;
    UARTxOp.TxOpc = 0 + 1;
	
	  FL_UART_ClearFlag_RXBuffFull(UART0);
    FL_UART_EnableIT_RXBuffFull(UART0);           //使能接收中断
	
    FL_UART_ClearFlag_TXShiftBuffEmpty(UART0);
    FL_UART_EnableIT_TXShiftBuffEmpty(UART0);     //使能发送中断
    FL_UART_WriteTXBuff(UART0, UARTxOp.TxBuf[0]); //先发送一字节数据，从而触发发送中断

}
